package org.heart.springsecurity.mapper;


import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.heart.springsecurity.pojo.Roles;
import org.heart.springsecurity.pojo.Users;

import java.util.List;

@Mapper
public interface AuthenticationMapper {

    Users getUser(@Param("email") String email);

    Users getLoadUserByPhoneNumber(@Param("phoneNumber") String phoneNumber);

    /**
     * 获取权限
     *
     * @param userId
     * @return
     */
    List<Roles> getAuthorities(@Param("userId") String userId);


    /**
     * 新增用户
     *
     * @param users
     */
    void addUser(Users users);


}
